package jj.jjstudy.controller;

import jj.jjstudy.entity.User;
import jj.jjstudy.response.ResponseData;
import jj.jjstudy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController {


    @Autowired
    private UserService userService;

    @RequestMapping(value = "inserUser",method = RequestMethod.POST)
    public ResponseData<Integer>inserUser(@RequestBody User user){

        return userService.inserUser(user);
    }


}
